chore(downloads): replace Docker alpine with slim#8784
chore(downloads): replace Docker alpine with slim#8784MikeMcC399 wants to merge 1 commit intonodejs:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
👋 Codeowner Review RequestThe following codeowners have been identified for the changed files: Team reviewers: @nodejs/nodejs-website Please review the changes when you have a chance. Thank you! 🙏 |
There was a problem hiding this comment.
Pull request overview
Updates the Node.js “Docker” install snippet shown on the download page to recommend Debian-based *-slim images instead of Alpine (musl) images, aligning the website guidance with Node.js platform support tiers.
Changes:
- Replace
node:<major>-alpinerecommendations withnode:<major>-slim. - Remove the conditional logic that previously switched between
alpineandslimbased on major version.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This comment was marked as resolved.
This comment was marked as resolved.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8784 +/- ##
==========================================
+ Coverage 75.23% 75.27% +0.04%
==========================================
Files 105 105
Lines 9242 9242
Branches 327 326 -1
==========================================
+ Hits 6953 6957 +4
+ Misses 2287 2283 -4
Partials 2 2 ☔ View full report in Codecov by Sentry. |
Description
Replace Docker
alpinewithslimdisplayed on https://nodejs.org/en/downloadhttps://nodejs.org/en/download previously recommended an Alpine Docker image, for instance, selecting the LTS version on this page suggests:
On the Platform list Node.js classifies Linux
muslplatforms as "Experimental", including Alpine as an example. The Strategy classification states:On the docker-node repo, workflows are set up such that the non-availability of
muslbuilds does not block the release of Node.js Docker images for security releases. For non-security releases, the strategy is currently undefined (see nodejs/docker-node#2363). Typically, maintainers may manually release Debian-based Docker images if Alpine builds are significantly delayed.This means that the "Experimental" status of the Alpine unofficial builds often causes their release to be delayed.
Replacement assessment
Alpine Docker images have typically been preferred and recommended due to their smaller size. Due to less content, the risk of vulnerabilities is also reduced. On Docker Hub, the image
node:alpineforlinux/amd64lists with 56.99 MB compressed size.node:slim, as a Debian alternative to Alpine Linux, built from the base imagedebian:*-slim, lists with 75.37 MB.Debian images use
glibc. The Docker imagenode:lts-slimis published with the following architectures, none of which are "Experimental":linux/amd64linux/arm64/v8linux/ppc64lelinux/s390xThe trade-off when moving from
node:alpinetonode:slimis the advantage of faster and more reliable availability of new releases (Tier 1 or 2), compared to the disadvantage of ~30% size increase. This is disregarding other basic differences between Alpine and Debian, where Alpine is considered more of a restricted run-time environment, and Debian more of a flexible development / build environment.Validation
Go to https://nodejs.org/en/download and select using "Docker" for LTS release. Note the instructions:
Copying-and-pasting the whole script in one go doesn't work correctly (not due to this PR).
Individually copying each command works fine:
Related Issues
Resolves: #8690
Check List
pnpm formatto ensure the code follows the style guide.pnpm testto check if all tests are passing.pnpm buildto check if the website builds without errors.